/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.casa_apoio.model.dao;

import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Order;

/**
 *
 * @author user01
 */
public class EstadoDAO<T> extends HibernateDAO<T> {

    public EstadoDAO(Class<T> classe, Session session) {
        super(classe, session);
    }

    public List<T> listarEstadoOrdenado() {
        Criteria criterio = criaCriteria();
        criterio.addOrder(Order.asc("estado"));
        List<T> listarEstadoOrdenado = criterio.list();
        return listarEstadoOrdenado;
    }

}
